Repository navigation
fix(backups): watchdog asserts dashboard offsite presence on R2 (#3914) - #5220
Merged
Merged
Conversation
… task 8948) - laptop-backups-watchdog.sh: opt-in section (c) via LAPTOP_BACKUPS_OFFSITE_CHECK - lists r2bak:supabase-backups/dashboard/<record date>/ and fails naming the R2 absence when dashboard-<date>.tar.zst is missing, even when the run record says complete (the 2026-10-29..2026-11-01 failure shape). Credentials via Bitwarden exactly as pm-dashboard-backup.sh; rclone/bws via PATH. - laptop-backups.nix: watchdog service sets LAPTOP_BACKUPS_OFFSITE_CHECK=1 (servicePath already carries rclone, ~/tools/bin carries bws). - tests: stub bws/rclone; offsite-present passes, planted offsite-absent fails naming R2, disabled check keeps old behavior. Full suite passes; live run against real R2 also passes (record date 2026-11-03 present).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remainder of #3914 (from triage task 7421), worked as task 8948:
Backfill (operational, already done — not in this diff): R2
supabase-backups/dashboard/was missing 2026-10-29..2026-11-01. All four date dirs were copied from the laptop local archives with the job's own rclone env-remote route (rclone copytoto the same destination shapepm-dashboard-backup.shuses) and verified by a fresh listing: R2 now holds 2026-10-27..2026-11-03, every object's size matching its local archive exactly (2026-10-29: 156352 B, 2026-10-30: 144040 B, 2026-10-31: 161681 B, 2026-11-01: 174899 B).Watchdog offsite-presence assertion (this diff):
laptop-backups-watchdog.shgains an opt-in section (c): whenLAPTOP_BACKUPS_OFFSITE_CHECK=1, it reads the run record'sdate, listsr2bak:supabase-backups/dashboard/<date>/(Bitwarden credentials exactly aspm-dashboard-backup.shfetches them; rclone/bws via PATH), and fails naming the R2 absence whendashboard-<date>.tar.zstis not there — even when the run record says complete, which is exactly the pm-dashboard-backup: offsite legs landed nothing since 2026-10-28; runs failing at db-dump; watchdog cannot see offsite absence #3914 failure shape the record-only check could not see.laptop-backups.nixsets the opt-in for the watchdog service (its PATH already carries rclone via servicePath and bws via ~/tools/bin).Tests
bash nixos/home/laptop-backups-watchdog.test.sh— all scenarios pass, including three new ones with stubbed bws/rclone: offsite-present exits 0, planted offsite-absence exits non-zero naming R2, and with the check disabled the same absence keeps the old behavior.OK jobs [dashboard] fresh within 26h— record date 2026-11-03 verified present on R2.Note: the watchdog change takes effect on the laptop when the home configuration is next applied (nixos/home is deployed from this repo); the backfill is already live.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.